Developer Documentation

QuickTime 4 API Documentation

Programming With QuickTime VR

| Previous | Chapter Contents | Chapter Top | Next |

Managing Imaging Characteristics

The QuickTime VR Manager provides functions that you can use to get and set imaging characteristics of a QuickTime VR movie.

QTVRGetVisible

You can use the QTVRGetVisible function to get a movie's visibility state.

Boolean QTVRGetVisible (QTVRInstance qtvr);
qtvr
An instance of a QuickTime VR movie.
function result
A Boolean value that indicates whether the specified movie is visible ( true ) or not ( false ).

DESCRIPTION

The QTVRGetVisible function returns, as its function result, a Boolean value that indicates whether the QuickTime VR movie specified by the qtvr parameter is visible ( true ) or not ( false ).

SPECIAL CONSIDERATIONS

QTVRGetVisible is valid only for panoramic nodes.

SEE ALSO

Use QTVRSetVisible (next) to set the visibility state of a movie.

QTVRSetVisible

You can use the QTVRSetVisible function to set a movie's visibility state.

OSErr QTVRSetVisible (QTVRInstance qtvr, Booleanvisible);
qtvr
An instance of a QuickTime VR movie.
visible
A Boolean value that indicates whether the specified movie is to be visible ( true ) or not ( false ).
function result
A result code.

DESCRIPTION

The QTVRSetVisible function sets the visibility state of the QuickTime VR movie specified by the qtvr parameter to the state specified by the visible parameter. Setting the visibility state to false is useful if you want to turn off imaging a QuickTime VR movie without purging the associated data from memory. When a panoramic node's visibility state is false , the corrected image is still drawn to the prescreen buffer. You can access the data in that buffer by calling QTVRSetPrescreenImagingCompleteProc .

SPECIAL CONSIDERATIONS

QTVRSetVisible is valid only for panoramic nodes.

SEE ALSO

Use QTVRGetVisible to get the visibility state of a movie.

QTVRGetImagingProperty

You can use the QTVRGetImagingProperty function to get the current value of an imaging property of a movie.

OSErr QTVRGetImagingProperty (
                     QTVRInstanceqtvr,
                     QTVRImagingModeimagingMode,
                     UInt32imagingProperty,
                     SInt32*propertyValue);
qtvr
An instance of a QuickTime VR movie.
imagingMode
An imaging mode. See "Imaging Modes" for a description of the available imaging modes.
imagingProperty
An imaging property. See "Imaging Property Types" for a description of the available imaging properties.
propertyValue
On entry, a pointer to a long integer. On exit, that long integer contains the current value of the specified imaging property for the specified mode.
function result
A result code.

DESCRIPTION

The QTVRGetImagingProperty function returns, in the long integer pointed to by the propertyValue parameter, the current value of the property specified by the imagingProperty parameter when the QuickTime VR movie specified by the qtvr parameter is in the mode specified by the imagingMode parameter.

SPECIAL CONSIDERATIONS

QTVRGetImagingProperty is valid only for panoramic nodes.

SEE ALSO

Use QTVRSetImagingProperty (next) to set an imaging property.

QTVRSetImagingProperty

You can use the QTVRSetImagingProperty function to set the value of an imaging property of a movie.

OSErr QTVRSetImagingProperty (
                     QTVRInstanceqtvr,
                     QTVRImagingModeimagingMode,
                     UInt32imagingProperty,
                     SInt32propertyValue);
qtvr
An instance of a QuickTime VR movie.
imagingMode
An imaging mode. See "Imaging Modes" for a description of the available imaging modes.
imagingProperty
An imaging property. See "Imaging Property Types" for a description of the available imaging properties.
propertyValue
The desired value for the specified imaging property for the specified mode.
function result
A result code.

DESCRIPTION

The QTVRSetImagingProperty function sets the value of the imaging property specified by the imagingProperty parameter for the imaging mode specified by the imagingMode parameter and the QuickTime VR movie specified by the qtvr parameter to the value passed in the propertyValue parameter.

Note that default values for all imaging properties can be contained in a QuickTime VR movie file. If no defaults are specified in a movie file, the QuickTime VR Manager uses these values: for static mode, the kQTVRImagingQuality property is codecHighQuality and kQTVRImagingDirectDraw is true ; for motion mode, the kQTVRImagingQuality property is codecLowQuality and kQTVRImagingDirectDraw is true . The default correction mode is kQTVRFullCorrection for both static and motion imaging modes.

It would look strange to have one correction mode for static imaging and a different correction mode for motion imaging. As a result, you should typically set the imagingMode parameter to kQTVRAllModes when setting a property of type kQTVRImagingCorrection .

SPECIAL CONSIDERATIONS

QTVRSetImagingProperty is valid only for panoramic nodes.

SEE ALSO

Use QTVRGetImagingProperty to get an imaging property.

QTVRUpdate

You can use the QTVRUpdate function to force an immediate update of a QuickTime VR movie image.

OSErr QTVRUpdate (QTVRInstance qtvr, QTVRImagingModeimagingMode);
qtvr
An instance of a QuickTime VR movie.
imagingMode
An imaging mode. See "Imaging Modes" for a description of the available imaging modes. You can specify the  kQTVRCurrentMode imaging mode to use the current imaging mode.
function result
A result code.

DESCRIPTION

The QTVRUpdate function immediately updates the image for the QuickTime VR movie specified by the qtvr parameter, without waiting for the next call to MoviesTask in your application's main event loop.

If you plan to call QTVRUpdate repeatedly for a movie instance, then for improved performance you should bracket those calls with calls to the QTVRBeginUpdateStream and QTVREndUpdateStream functions (described next).

SPECIAL CONSIDERATIONS

If you call QTVRUpdate after calling QTVRBeginUpdateStream but before calling QTVREndUpdateStream , the imagingMode parameter passed to QTVRUpdate must be the same as the imagingMode parameter passed to QTVRBeginUpdateStream . If you do not specify the same imaging mode to those two functions, an error will result.

SEE ALSO

Listing 2-3 illustrates the use of QTVRUpdate .

QTVRBeginUpdateStream

You can use the QTVRBeginUpdateStream function to begin a stream of immediate updates to a QuickTime VR movie.

OSErr QTVRBeginUpdateStream (
                     QTVRInstance qtvr,
                     QTVRImagingModeimagingMode);
qtvr
An instance of a QuickTime VR movie.
imagingMode
An imaging mode. See "Imaging Modes" for a description of the available imaging modes.
function result
A result code.

DESCRIPTION

The QTVRBeginUpdateStream function configures the QuickTime VR movie specified by the qtvr parameter for a stream of immediate updates to its movie image. After calling QTVRBeginUpdateStream , you perform the updates by calling QTVRUpdate . When you are finished performing the updates, call QTVREndUpdateStream . Issuing a stream of image updates in this manner is significantly faster than simply calling QTVRUpdate repeatedly (that is, not within a begin/end update sequence).

Each call to QTVRBeginUpdateStream must be balanced by a call to QTVREndUpdateStream , but you can nest these calls.

SPECIAL CONSIDERATIONS

After you call QTVRBeginUpdateStream and before you call QTVREndUpdateStream , you must not change any of the QuickTime VR movie's imaging properties.

Calling QTVRBeginUpdateStream locks down large blocks of memory. As a result, you should minimize the amount of time before calling QTVREndUpdateStream .

QTVRBeginUpdateStream is valid only for panoramic nodes.

SEE ALSO

Use QTVREndUpdateStream (next) to end a stream of immediate updates to a QuickTime VR movie.

QTVREndUpdateStream

You can use the QTVREndUpdateStream function to end a stream of immediate updates to a QuickTime VR movie.

OSErr QTVREndUpdateStream (QTVRInstance qtvr);
qtvr
An instance of a QuickTime VR movie.
function result
A result code.

DESCRIPTION

The QTVREndUpdateStream function unlocks the memory locked by the matching call to QTVRBeginUpdateStream for the QuickTime VR movie specified by the qtvr parameter and reverses any other actions performed by that call.

Each call to QTVRBeginUpdateStream must be balanced by a call to QTVREndUpdateStream , but you can nest these calls. For nested calls, only the final call to QTVREndUpdateStream unlocks the memory locked by the first call to QTVRBeginUpdateStream .

SPECIAL CONSIDERATIONS

QTVREndUpdateStream is valid only for panoramic nodes.

SEE ALSO

Use QTVRBeginUpdateStream to begin a stream of immediate updates to a QuickTime VR movie.

QTVRSetTransitionProperty

You can use the QTVRSetTransitionProperty function to set the value of a transition property.

OSErr QTVRSetTransitionProperty (
                     QTVRInstance qtvr,
                     UInt32transitionType,
                     UInt32transitionProperty,
                     SInt32 transitionValue);
qtvr
An instance of a QuickTime VR movie.
transitionType
A type of transition. See "Transition Type" for a description of the available transition type.
transitionProperty
A type of transition property. See "Transition Properties" for a description of the available transition property types.
transitionValue
The desired value for the specified transition property.
function result
A result code.

DESCRIPTION

The QTVRSetTransitionProperty function sets the value of the transition property whose type is specified by the transitionType and transitionProperty parameters for the movie specified by the qtvr parameter to the value specified by the transitionValue parameter.

Note that calling QTVRSetTransitionProperty simply sets a transition property's value; you must still call QTVREnableTransition to enable that transition effect.

SPECIAL CONSIDERATIONS

QTVRSetTransitionProperty is valid only for panoramic nodes.

SEE ALSO

Use QTVREnableTransition (next) to enable a transition effect.

QTVREnableTransition

You can use the QTVREnableTransition function to enable or disable a transition effect.

OSErr QTVREnableTransition (
                     QTVRInstance qtvr,
                     UInt32transitionType,
                     Booleanenable);
qtvr
An instance of a QuickTime VR movie.
transitionType
A type of transition property. See "Transition Type" for a description of the available transition type.
enable
A Boolean value that indicates whether the specified transition property is to be enabled ( true ) or disabled ( false ).
function result
A result code.

DESCRIPTION

The QTVREnableTransition function enables or disables the transition property specified by the transitionType parameter for the movie specified by the qtvr parameter, as indicated by the value of the enable parameter. Once a transition effect is enabled, it is used at the appropriate time until it is disabled by a subsequent call to QTVREnableTransition .

SPECIAL CONSIDERATIONS

QTVREnableTransition is valid only for panoramic nodes.

SEE ALSO

Use QTVRSetTransitionProperty to set the value of a transition property.


© 1998 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |